Model run by trashe using Apollo 0.4.0 on R 4.5.3 for Linux. Please acknowledge the use of Apollo by citing Hess & Palma (2019) DOI 10.1016/j.jocm.2019.100170 www.ApolloChoiceModelling.com Model name : EM_LC_no_covariates Model description : LC model with constant class allocation probabilities on Swiss route choice data, EM algorithm Model run at : 2026-11-02 22:09:17 Estimation method : EM algorithm (bfgs) -> Maximum likelihood (bgw) Estimation diagnosis : Relative function convergence (favorable) Optimisation diagnosis : Maximum found hessian properties : Negative definite maximum eigenvalue : -14.988124 reciprocal of condition number : 8.8896e-05 Number of individuals : 388 Number of rows in database : 3492 Number of modelled outcomes : 3492 Number of cores used : 1 Model without mixing LL(start) : -1755.5 LL (whole model) at equal shares, LL(0) : -2420.47 LL (whole model) at observed shares, LL(C) : -2420.39 LL(final, whole model) : -1561.79 Rho-squared vs equal shares : 0.3548 Adj.Rho-squared vs equal shares : 0.3502 Rho-squared vs observed shares : 0.3547 Adj.Rho-squared vs observed shares : 0.3506 AIC : 3145.57 BIC : 3213.31 LL(0,Class_1) : -2420.47 LL(final,Class_1) : -1770.81 LL(0,Class_2) : -2420.47 LL(final,Class_2) : -2513.55 Estimated parameters : 11 Time taken (hh:mm:ss) : 00:00:12.82 pre-estimation : 00:00:0.46 estimation : 00:00:11.34 post-estimation : 00:00:1.02 Iterations : 46 (EM) & 6 (bgw) Unconstrained optimisation. Estimates: Estimate s.e. t.rat.(0) Rob.s.e. Rob.t.rat.(0) asc_1_a -0.06788 0.064304 -1.0556 0.074915 -0.9061 asc_1_b 0.04162 0.110475 0.3768 0.133034 0.3129 asc_2_a 0.00000 NA NA NA NA asc_2_b 0.00000 NA NA NA NA beta_tt_a -0.03715 0.005248 -7.0781 0.008892 -4.1773 beta_tt_b -0.21801 0.025473 -8.5584 0.045127 -4.8310 beta_tc_a -0.05041 0.013039 -3.8662 0.013133 -3.8387 beta_tc_b -0.79867 0.084892 -9.4081 0.113928 -7.0103 beta_hw_a -0.03447 0.002991 -11.5233 0.004480 -7.6926 beta_hw_b -0.05556 0.005510 -10.0838 0.008061 -6.8929 beta_ch_a -0.62615 0.072955 -8.5826 0.102137 -6.1305 beta_ch_b -2.75781 0.227564 -12.1189 0.280303 -9.8387 delta_a -0.04386 0.174715 -0.2510 0.198436 -0.2210 delta_b 0.00000 NA NA NA NA Summary of class allocation for model component : Mean prob. Class_1 0.4890 Class_2 0.5110 Overview of choices for MNL model component Class_1: alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Overview of choices for MNL model component Class_2: alt1 alt2 Times available 3492.00 3492.00 Times chosen 1734.00 1758.00 Percentage chosen overall 49.66 50.34 Percentage chosen when available 49.66 50.34 Classical covariance matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b beta_tc_a asc_1_a 0.004135 -0.001972 -1.863e-06 -1.586e-05 -2.308e-05 asc_1_b -0.001972 0.012205 5.256e-05 -4.7332e-04 6.647e-05 beta_tt_a -1.863e-06 5.256e-05 2.754e-05 -2.583e-05 5.042e-05 beta_tt_b -1.586e-05 -4.7332e-04 -2.583e-05 6.4887e-04 2.579e-07 beta_tc_a -2.308e-05 6.647e-05 5.042e-05 2.579e-07 1.7002e-04 beta_tc_b -1.073e-05 -0.001265 -1.565e-05 0.001942 5.482e-05 beta_hw_a -1.353e-06 3.438e-06 4.378e-06 -6.070e-07 5.012e-06 beta_hw_b -3.850e-06 -1.912e-05 -4.422e-06 5.665e-05 -1.061e-06 beta_ch_a -1.2939e-04 -3.4797e-04 9.253e-05 5.5022e-04 1.3769e-04 beta_ch_b -0.001461 7.8312e-04 -1.204e-05 0.004103 3.3249e-04 delta_a 9.1104e-04 -1.0738e-04 -1.6119e-04 -0.001692 -4.0924e-04 beta_tc_b beta_hw_a beta_hw_b beta_ch_a beta_ch_b asc_1_a -1.073e-05 -1.353e-06 -3.850e-06 -1.2939e-04 -0.001461 asc_1_b -0.001265 3.438e-06 -1.912e-05 -3.4797e-04 7.8312e-04 beta_tt_a -1.565e-05 4.378e-06 -4.422e-06 9.253e-05 -1.204e-05 beta_tt_b 0.001942 -6.070e-07 5.665e-05 5.5022e-04 0.004103 beta_tc_a 5.482e-05 5.012e-06 -1.061e-06 1.3769e-04 3.3249e-04 beta_tc_b 0.007207 2.385e-05 1.5647e-04 0.002333 0.012446 beta_hw_a 2.385e-05 8.946e-06 -5.412e-06 8.824e-05 -5.644e-06 beta_hw_b 1.5647e-04 -5.412e-06 3.036e-05 -2.896e-05 5.3000e-04 beta_ch_a 0.002333 8.824e-05 -2.896e-05 0.005323 0.004263 beta_ch_b 0.012446 -5.644e-06 5.3000e-04 0.004263 0.051785 delta_a -0.006443 -1.2758e-04 -2.982e-05 -0.006927 -0.017966 delta_a asc_1_a 9.1104e-04 asc_1_b -1.0738e-04 beta_tt_a -1.6119e-04 beta_tt_b -0.001692 beta_tc_a -4.0924e-04 beta_tc_b -0.006443 beta_hw_a -1.2758e-04 beta_hw_b -2.982e-05 beta_ch_a -0.006927 beta_ch_b -0.017966 delta_a 0.030525 Robust covariance matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b beta_tc_a asc_1_a 0.005612 -0.003564 -8.728e-05 1.9279e-04 -6.976e-05 asc_1_b -0.003564 0.017698 3.4674e-04 -0.002339 2.7999e-04 beta_tt_a -8.728e-05 3.4674e-04 7.907e-05 -2.3225e-04 7.106e-05 beta_tt_b 1.9279e-04 -0.002339 -2.3225e-04 0.002036 -1.2765e-04 beta_tc_a -6.976e-05 2.7999e-04 7.106e-05 -1.2765e-04 1.7246e-04 beta_tc_b 4.7980e-04 -0.005860 -3.6696e-04 0.004579 -2.0752e-04 beta_hw_a -3.927e-05 3.855e-05 1.671e-05 -2.796e-05 1.230e-05 beta_hw_b 2.125e-05 -8.732e-05 -2.984e-05 1.4176e-04 -1.639e-05 beta_ch_a -8.1170e-04 -0.001163 1.3247e-04 0.001277 1.0438e-04 beta_ch_b -0.002719 9.5258e-04 -8.8733e-04 0.008807 -1.8493e-04 delta_a 0.002139 4.9042e-04 -1.0331e-04 -0.003179 -2.9802e-04 beta_tc_b beta_hw_a beta_hw_b beta_ch_a beta_ch_b asc_1_a 4.7980e-04 -3.927e-05 2.125e-05 -8.1170e-04 -0.002719 asc_1_b -0.005860 3.855e-05 -8.732e-05 -0.001163 9.5258e-04 beta_tt_a -3.6696e-04 1.671e-05 -2.984e-05 1.3247e-04 -8.8733e-04 beta_tt_b 0.004579 -2.796e-05 1.4176e-04 0.001277 0.008807 beta_tc_a -2.0752e-04 1.230e-05 -1.639e-05 1.0438e-04 -1.8493e-04 beta_tc_b 0.012980 3.293e-05 1.7707e-04 0.005185 0.017364 beta_hw_a 3.293e-05 2.007e-05 -1.974e-05 2.2813e-04 -1.8642e-04 beta_hw_b 1.7707e-04 -1.974e-05 6.498e-05 -1.8903e-04 0.001032 beta_ch_a 0.005185 2.2813e-04 -1.8903e-04 0.010432 0.006148 beta_ch_b 0.017364 -1.8642e-04 0.001032 0.006148 0.078570 delta_a -0.010411 -3.0705e-04 1.8797e-04 -0.013507 -0.022944 delta_a asc_1_a 0.002139 asc_1_b 4.9042e-04 beta_tt_a -1.0331e-04 beta_tt_b -0.003179 beta_tc_a -2.9802e-04 beta_tc_b -0.010411 beta_hw_a -3.0705e-04 beta_hw_b 1.8797e-04 beta_ch_a -0.013507 beta_ch_b -0.022944 delta_a 0.039377 Classical correlation matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b beta_tc_a asc_1_a 1.000000 -0.277602 -0.005521 -0.009682 -0.02752 asc_1_b -0.277602 1.000000 0.090650 -0.168195 0.04615 beta_tt_a -0.005521 0.090650 1.000000 -0.193224 0.73678 beta_tt_b -0.009682 -0.168195 -0.193224 1.000000 7.7636e-04 beta_tc_a -0.027525 0.046146 0.736776 7.7636e-04 1.00000 beta_tc_b -0.001965 -0.134880 -0.035138 0.898109 0.04952 beta_hw_a -0.007032 0.010404 0.278934 -0.007967 0.12851 beta_hw_b -0.010866 -0.031416 -0.152927 0.403622 -0.01477 beta_ch_a -0.027580 -0.043173 0.241668 0.296076 0.14474 beta_ch_b -0.099843 0.031150 -0.010080 0.707730 0.11205 delta_a 0.081090 -0.005563 -0.175801 -0.380218 -0.17964 beta_tc_b beta_hw_a beta_hw_b beta_ch_a beta_ch_b asc_1_a -0.001965 -0.007032 -0.01087 -0.02758 -0.099843 asc_1_b -0.134880 0.010404 -0.03142 -0.04317 0.031150 beta_tt_a -0.035138 0.278934 -0.15293 0.24167 -0.010080 beta_tt_b 0.898109 -0.007967 0.40362 0.29608 0.707730 beta_tc_a 0.049521 0.128509 -0.01477 0.14474 0.112052 beta_tc_b 1.000000 0.093945 0.33450 0.37665 0.644262 beta_hw_a 0.093945 1.000000 -0.32836 0.40439 -0.008292 beta_hw_b 0.334504 -0.328358 1.00000 -0.07203 0.422666 beta_ch_a 0.376650 0.404388 -0.07203 1.00000 0.256797 beta_ch_b 0.644262 -0.008292 0.42267 0.25680 1.000000 delta_a -0.434404 -0.244140 -0.03097 -0.54341 -0.451875 delta_a asc_1_a 0.081090 asc_1_b -0.005563 beta_tt_a -0.175801 beta_tt_b -0.380218 beta_tc_a -0.179639 beta_tc_b -0.434404 beta_hw_a -0.244140 beta_hw_b -0.030972 beta_ch_a -0.543412 beta_ch_b -0.451875 delta_a 1.000000 Robust correlation matrix: asc_1_a asc_1_b beta_tt_a beta_tt_b beta_tc_a asc_1_a 1.00000 -0.35765 -0.13103 0.05703 -0.07091 asc_1_b -0.35765 1.00000 0.29311 -0.38965 0.16026 beta_tt_a -0.13103 0.29311 1.00000 -0.57878 0.60851 beta_tt_b 0.05703 -0.38965 -0.57878 1.00000 -0.21540 beta_tc_a -0.07091 0.16026 0.60851 -0.21540 1.00000 beta_tc_b 0.05622 -0.38665 -0.36222 0.89068 -0.13870 beta_hw_a -0.11699 0.06468 0.41945 -0.13828 0.20905 beta_hw_b 0.03519 -0.08142 -0.41633 0.38969 -0.15482 beta_ch_a -0.10608 -0.08562 0.14585 0.27715 0.07782 beta_ch_b -0.12950 0.02555 -0.35599 0.69626 -0.05024 delta_a 0.14386 0.01858 -0.05855 -0.35498 -0.11436 beta_tc_b beta_hw_a beta_hw_b beta_ch_a beta_ch_b asc_1_a 0.05622 -0.11699 0.03519 -0.10608 -0.12950 asc_1_b -0.38665 0.06468 -0.08142 -0.08562 0.02555 beta_tt_a -0.36222 0.41945 -0.41633 0.14585 -0.35599 beta_tt_b 0.89068 -0.13828 0.38969 0.27715 0.69626 beta_tc_a -0.13870 0.20905 -0.15482 0.07782 -0.05024 beta_tc_b 1.00000 0.06452 0.19281 0.44559 0.54375 beta_hw_a 0.06452 1.00000 -0.54654 0.49853 -0.14844 beta_hw_b 0.19281 -0.54654 1.00000 -0.22959 0.45676 beta_ch_a 0.44559 0.49853 -0.22959 1.00000 0.21476 beta_ch_b 0.54375 -0.14844 0.45676 0.21476 1.00000 delta_a -0.46050 -0.34536 0.11751 -0.66645 -0.41250 delta_a asc_1_a 0.14386 asc_1_b 0.01858 beta_tt_a -0.05855 beta_tt_b -0.35498 beta_tc_a -0.11436 beta_tc_b -0.46050 beta_hw_a -0.34536 beta_hw_b 0.11751 beta_ch_a -0.66645 beta_ch_b -0.41250 delta_a 1.00000 Settings and functions used in model definition: apollo_control -------------- Value modelName "EM_LC_no_covariates" modelDescr "LC model with constant class allocation probabilities on Swiss route choice data, EM algorithm" indivID "ID" noValidation "TRUE" noDiagnostics "TRUE" outputDirectory "output/" debug "FALSE" nCores "1" workInLogs "FALSE" seed "13" mixing "FALSE" HB "FALSE" calculateLLC "TRUE" analyticHessian "FALSE" dropLoopExpansion "FALSE" dropRedefCheck "FALSE" panelData "TRUE" analyticGrad "FALSE" analyticGrad_manualSet "FALSE" overridePanel "FALSE" preventOverridePanel "FALSE" noModification "FALSE" Hessian routines attempted -------------------------- numerical second derivative of LL (using numDeriv) apollo_lcPars --------------- function (apollo_beta, apollo_inputs) { lcpars = list() lcpars[["asc_1"]] = list(asc_1_a, asc_1_b) lcpars[["asc_2"]] = list(asc_2_a, asc_2_b) lcpars[["beta_tt"]] = list(beta_tt_a, beta_tt_b) lcpars[["beta_tc"]] = list(beta_tc_a, beta_tc_b) lcpars[["beta_hw"]] = list(beta_hw_a, beta_hw_b) lcpars[["beta_ch"]] = list(beta_ch_a, beta_ch_b) lcpars[["pi_values"]] = list(class_a = 1/(1 + exp(delta_b - delta_a)), class_b = 1/(1 + exp(delta_a - delta_b))) return(lcpars) } apollo_probabilities ---------------------- function (apollo_beta, apollo_inputs, functionality = "estimate") { apollo_attach(apollo_beta, apollo_inputs) on.exit(apollo_detach(apollo_beta, apollo_inputs)) P = list() mnl_settings = list(alternatives = c(alt1 = 1, alt2 = 2), avail = list(alt1 = 1, alt2 = 1), choiceVar = choice) for (s in 1:length(pi_values)) { V = list() V[["alt1"]] = asc_1[[s]] + beta_tc[[s]] * tc1 + beta_tt[[s]] * tt1 + beta_hw[[s]] * hw1 + beta_ch[[s]] * ch1 V[["alt2"]] = asc_2[[s]] + beta_tc[[s]] * tc2 + beta_tt[[s]] * tt2 + beta_hw[[s]] * hw2 + beta_ch[[s]] * ch2 mnl_settings$utilities = V P[[paste0("Class_", s)]] = apollo_mnl(mnl_settings, functionality) P[[paste0("Class_", s)]] = apollo_panelProd(P[[paste0("Class_", s)]], apollo_inputs, functionality) } lc_settings = list(inClassProb = P, classProb = pi_values) P[["model"]] = apollo_lc(lc_settings, apollo_inputs, functionality) P = apollo_prepareProb(P, apollo_inputs, functionality) return(P) }